package com.liang.service.role;

import com.liang.dao.BaseDao;
import com.liang.dao.role.RoleDaoImpl;
import com.liang.pojo.Role;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.util.ArrayList;
import java.util.List;

public class RoleServiceImpl implements RoleService{
    RoleDaoImpl roleDao = null;
    public RoleServiceImpl() {
        roleDao = new RoleDaoImpl();
    }

    @Override
    public List<Role> getRoleList(String roleCode, String roleName) {
        List<Role> roleList = new ArrayList<>();
        Connection connection = BaseDao.getConnection();
        roleList = roleDao.getRoleList(connection, roleCode, roleName);


        return roleList;
    }
}
